#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

//int main() {
    /*int h, r;
    scanf("%d %d", &h, &r);
    float v = 3.14 * h * r * r;
    printf("%d", (10000 / v) + 1);*/

    /*printf("%02d", 1 % 24);
    return 0;
}*/
int main() {
    int hour, minute, k;
    scanf("%d:%d,%d", &hour, &minute, &k);
    hour = (hour + (k + minute) / 60) % 24;
    minute = (k + minute) % 60;
    printf("%02d:%02d", hour, minute);
    return 0;
}